<template>
  <div class="schContent">
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="rcjb" label="优先级" width="180" />
      <el-table-column prop="title" label="日程标题" />
      <el-table-column prop="content" label="日程内容" />
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: new Date(),
      dialogVisible: false,
      scheduleList: [],
      resultTime: [],
      tableData: []
    };
  },
  created() {
    this.sendPost();
  },
  methods: {
    sendPost: function() {
      var a = {
        code: 200,
        data: {
          data: [
            {
              createBy: null,
              updatedBy: null,
              createTime: null,
              updateTime: null,
              checked: null,
              id: 454,
              title: '学生开学',
              datetime: null,
              content: '学生开学',
              fqr: 'admin',
              cyr: null,
              state: null,
              sfgk: '1',
              kssj: '2022-09-01',
              jssj: '2022-09-02',
              rcjb: '重要日程',
              name: null,
              flag: 0,
              sysUserMembers: null,
              sysOrganizations: null,
              yhsfs: null
            },
            {
              createBy: null,
              updatedBy: null,
              createTime: null,
              updateTime: null,
              checked: null,
              id: 456,
              title: '开会',
              datetime: null,
              content: '开会',
              fqr: 'admin',
              cyr: null,
              state: null,
              sfgk: null,
              kssj: '2022-09-06',
              jssj: '2022-09-08',
              rcjb: '一般日程',
              name: null,
              flag: 0,
              sysUserMembers: null,
              sysOrganizations: null,
              yhsfs: null
            },
            {
              createBy: null,
              updatedBy: null,
              createTime: null,
              updateTime: null,
              checked: null,
              id: 402,
              title: '加班',
              datetime: null,
              content: '紧急加班',
              fqr: 'admin',
              cyr: null,
              state: null,
              sfgk: '1',
              kssj: '2022-09-03',
              jssj: '2022-09-05',
              rcjb: '紧急日程',
              name: null,
              flag: 0,
              sysUserMembers: null,
              sysOrganizations: null,
              yhsfs: null
            },
            {
              createBy: null,
              updatedBy: null,
              createTime: null,
              updateTime: null,
              checked: null,
              id: 453,
              title: '项目例会',
              datetime: null,
              content: '项目例会',
              fqr: 'admin',
              cyr: null,
              state: null,
              sfgk: '1',
              kssj: '2022-09-01',
              jssj: '2022-09-03',
              rcjb: '重要日程',
              name: null,
              flag: 0,
              sysUserMembers: null,
              sysOrganizations: null,
              yhsfs: null
            }
          ],
          pagerSize: 5
        },
        msg: 'ok',
        path: null,
        extra: null,
        timestamp: 1662002453438,
        errorMsg: '',
        isSuccess: true
      };
      // var result = res.data;
      var result = a.data;
      var code = a.code;
      if (code == 200) {
        this.scheduleList = result.data.data;
      }
      // console.log(result.data.data[0]);
      var length = result.pagerSize;
      for (var i = 0; i < length; i++) {
        var sch = {
          rcjb: result.data[i].rcjb,
          title: result.data[i].title,
          content: result.data[i].content
        };
        this.tableData.push(sch);

        console.log(this.tableData);
      }
    }
  }
};
</script>

<style scoped>
.schContent {
  padding-top: 5px;
}
.schContent ::v-deep .el-table__header-wrapper thead > tr > th {
  background-color: #f4f4f4;
}

.schContent ::v-deep .el-table__body-wrapper table {
  height: 256px;
}
</style>
